import request from "./axios";

export default {
    query: (params: any) => {  //  查询的接口
        return request({
            method: "get",
            url: "/goodsList",
            params
        })
    },
    post: (data: any) => {  //  新增的接口
        return request({
            method: "post",
            url: "/goodsList",
            data
        })
    },
    put: (data: any) => {  //  修改的接口
        return request({
            method: "put",
            url: "/goodsList/"+data.id,
            data
        })
    },
    delete:(id: number)=>{
        return request({
            method:"delete",
            url:"/goodsList/"+id
        })
    }
}
